var net = require('net');

var client = net.connect({ port: 8080 }, function() {
    console.log('连接服务端');
    client.end();
});

client.on('end', function() {
    console.log('客户端断开连接');
});